<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<jsp:include page="head.jsp"/>
<!-- 中间内容开始 -->
<!--首页轮播图-->
<div class="layui-container">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md8">
            <div class="fly-panel" style="padding: 15px;">
                <div class="layui-carousel" id="test1">
                    <div carousel-item align="center">
                        <c:if test="${lunbo.size()==0}">
                            <c:forEach begin="0" end="3" var="lunbo">
                                <div><img src="${pageContext.request.contextPath}/img/test1.jpg" style="height: 100%;width: 100%;"></div>
                            </c:forEach>
                        </c:if>
                        <c:if test="${lunbo.size()!=0}">
                            <c:forEach items="${lunbo}" var="lunbo">
                                <div><img src="${pageContext.request.contextPath}${lunbo.lPath}" style="height: 100%;width: 100%;"></div>
                            </c:forEach>
                        </c:if>

                    </div>
                </div>
            </div>

            <div class="fly-panel" style="margin-bottom: 0;">
                <ul class="fly-list">
                    <c:forEach items="${blogNew}" var="bn">
                        <li>
                            <a href="${pageContext.request.contextPath}/blog/content.do?bId=${bn.bId}" class="fly-avatar">
                                <img src="${pageContext.request.contextPath}${bn.user.uImage}" alt="${bn.user.uNickName}">
                            </a>
                            <h2>
                                <a class="layui-badge">${bn.user.uType}</a>
                                <a href="${pageContext.request.contextPath}/blog/content.do?bId=${bn.bId}">${bn.bTitle}</a>
                            </h2>
                            <div class="fly-list-info">
                                <a href="${pageContext.request.contextPath}/blog/to_home.do?uId=${bn.user.uId}" link>
                                    <cite>${bn.user.uNickName}</cite>
                                </a>
                                <span><spring:eval expression="bn.bCreateTime"/></span>
                                <span class="fly-list-nums">
                                <i class="iconfont icon-pinglun1" title="评论"></i> ${bn.bCom==null?0:bn.bCom}
                            </span>
                            </div>
                            <div class="fly-list-badge">

                            </div>
                        </li>
                    </c:forEach>
                </ul>
                <div style="text-align: center">
                    <div class="laypage-main">
                        <a href="${pageContext.request.contextPath}/blog/list.do?currentPage=1" class="laypage-next">更多</a>
                    </div>
                </div>

            </div>
        </div>
        <div class="layui-col-md4">

            <div class="fly-panel">
                <h3 class="fly-panel-title">研究方向</h3>
                <div style="padding: 30px;">
                    <c:forEach items="${types}" var="types">
                        <span class="layui-badge-rim" style="margin: 5px; padding: 2px;">
                            <a href="${pageContext.request.contextPath}/blog/typelist.do?currentPage=1&tId=${types.tId}">${types.tName}</a>
                        </span>
                    </c:forEach>
                </div>

            </div>
        </div>
    </div>
</div>
<!-- 中间内容结束 -->
<jsp:include page="bottom.jsp"/>